package com.ruoyi.es.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.dromara.easyes.annotation.IndexField;
import org.dromara.easyes.annotation.IndexId;
import org.dromara.easyes.annotation.IndexName;
import org.dromara.easyes.annotation.rely.FieldType;

import java.util.Date;

@Data
@IndexName
public class EsDeviceDataInfo {

    @IndexId
    private String id;

    private Long deviceId;

    private Long deptId;

    private String deviceCode;


    /**
     * 累计热量(KWH)
     */
    private Double heatQuantity;

    /**
     * 累计热量单位
     */
    private String heatQuantityUnit;

    /**
     * 累计冷量
     */
    private Double coldQuantity;

    /**
     * 累计冷量单位
     */
    private String coldQuantityUnit;
    /**
     * 累计流量(m^3)
     */
    private Double volume;

    /**
     * 累计流量单位
     */
    private String volumeUnit;
    /**
     * 热功率(KW)
     */
    private Double heatPower;

    /**
     * 热功率单位
     */
    private String heatPowerUnit;

    /**
     * 瞬时热量(m3/h)
     */
    private Double flowrate;

    /**
     * 流速
     */
    private Double flowrateReal;

    /**
     * 瞬时热量单位
     */
    private String flowrateUnit;
    /**
     * 进水温度(℃)
     */
    private Double tempIntake;
    /**
     * 回水温度(℃)
     */
    private Double tempReturn;

    /**
     * 累计工作时间, 单位：小时
     */
    private Integer hoursOperating;
    /**
     * 温差(℃)
     */
    private Double tempDiff;
    /**
     * 采样时间
     */
    @IndexField(fieldType = FieldType.DATE, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date timeSample;
    /**
     * 上传时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @IndexField(fieldType = FieldType.DATE, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date timeUpload;

    /**
     * 上报时间戳
     */
    private Long timestamp;
    /**
     *  热表状态
     */
    private Integer state;
    /**
     * 集中器ID
     */
    private String cmrId;
    /**
     * 热表ID
     */
    private String heatMeterId;
    /**
     * 备注
     */
    private String notes;

    @IndexField(fieldType = FieldType.DATE, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

}
